package com.woniu.dao;

import com.woniu.pojo.Admin;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AdminMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Admin record);

    int insertSelective(Admin record);

    Admin selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Admin record);

    int updateByPrimaryKey(Admin record);

    @Select("select * from pc_admin where username = #{username}")
    Admin selectByUserName(String userName);

    List<Admin> selectByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);

    void batchDel(List<Integer> list);

    @Select("select * from pc_admin where role_id = #{value}")
    List<Admin> selectByRoleId(Integer roleId);

    List<Admin> selectAdminByRoleId(List<Integer> rolesId);

}